package com.lagou.boot;

import com.lagou.client.RPCConsumer;
import com.lagou.pojo.RpcRequest;
import com.lagou.service.IUserService;

public class ConsumerBoot {
    private static final String PROVIDER_NAME = "UserService#sayHello#";

    public static void main(String[] args) throws InterruptedException {
        IUserService service = (IUserService) RPCConsumer.crreateProxy2(IUserService.class);

        while (true){
            System.out.println("客户端发送数据");
            String result = service.sayHello("are you ok");
            System.out.println("得到服务器返回数据：" + result);

            String result1 = service.doWork("1", "jack");
            System.out.println("得到服务器返回数据：" + result1);
            Thread.sleep(2000);
        }
    }
}
